/*
 * XML Type:  XCheckBox
 * Namespace: http://www.seedwill.com/xul/widget/
 * Java type: com.seedwill.xul.widget.XCheckBox
 *
 * Automatically generated - do not modify.
 */
package com.seedwill.xul.widget.impl;
/**
 * An XML XCheckBox(@http://www.seedwill.com/xul/widget/).
 *
 * This is a complex type.
 */
public class XCheckBoxImpl extends com.seedwill.xul.widget.impl.XInputImpl implements com.seedwill.xul.widget.XCheckBox
{
    private static final long serialVersionUID = 1L;
    
    public XCheckBoxImpl(org.apache.xmlbeans.SchemaType sType)
    {
        super(sType);
    }
    
    private static final javax.xml.namespace.QName CHECKED$0 = 
        new javax.xml.namespace.QName("", "checked");
    private static final javax.xml.namespace.QName DEFAULTCHECKED$2 = 
        new javax.xml.namespace.QName("", "defaultChecked");
    
    
    /**
     * Gets the "checked" attribute
     */
    public boolean getChecked()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(CHECKED$0);
            if (target == null)
            {
                target = (org.apache.xmlbeans.SimpleValue)get_default_attribute_value(CHECKED$0);
            }
            if (target == null)
            {
                return false;
            }
            return target.getBooleanValue();
        }
    }
    
    /**
     * Gets (as xml) the "checked" attribute
     */
    public org.apache.xmlbeans.XmlBoolean xgetChecked()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.XmlBoolean target = null;
            target = (org.apache.xmlbeans.XmlBoolean)get_store().find_attribute_user(CHECKED$0);
            if (target == null)
            {
                target = (org.apache.xmlbeans.XmlBoolean)get_default_attribute_value(CHECKED$0);
            }
            return target;
        }
    }
    
    /**
     * True if has "checked" attribute
     */
    public boolean isSetChecked()
    {
        synchronized (monitor())
        {
            check_orphaned();
            return get_store().find_attribute_user(CHECKED$0) != null;
        }
    }
    
    /**
     * Sets the "checked" attribute
     */
    public void setChecked(boolean checked)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(CHECKED$0);
            if (target == null)
            {
                target = (org.apache.xmlbeans.SimpleValue)get_store().add_attribute_user(CHECKED$0);
            }
            target.setBooleanValue(checked);
        }
    }
    
    /**
     * Sets (as xml) the "checked" attribute
     */
    public void xsetChecked(org.apache.xmlbeans.XmlBoolean checked)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.XmlBoolean target = null;
            target = (org.apache.xmlbeans.XmlBoolean)get_store().find_attribute_user(CHECKED$0);
            if (target == null)
            {
                target = (org.apache.xmlbeans.XmlBoolean)get_store().add_attribute_user(CHECKED$0);
            }
            target.set(checked);
        }
    }
    
    /**
     * Unsets the "checked" attribute
     */
    public void unsetChecked()
    {
        synchronized (monitor())
        {
            check_orphaned();
            get_store().remove_attribute(CHECKED$0);
        }
    }
    
    /**
     * Gets the "defaultChecked" attribute
     */
    public boolean getDefaultChecked()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(DEFAULTCHECKED$2);
            if (target == null)
            {
                return false;
            }
            return target.getBooleanValue();
        }
    }
    
    /**
     * Gets (as xml) the "defaultChecked" attribute
     */
    public org.apache.xmlbeans.XmlBoolean xgetDefaultChecked()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.XmlBoolean target = null;
            target = (org.apache.xmlbeans.XmlBoolean)get_store().find_attribute_user(DEFAULTCHECKED$2);
            return target;
        }
    }
    
    /**
     * True if has "defaultChecked" attribute
     */
    public boolean isSetDefaultChecked()
    {
        synchronized (monitor())
        {
            check_orphaned();
            return get_store().find_attribute_user(DEFAULTCHECKED$2) != null;
        }
    }
    
    /**
     * Sets the "defaultChecked" attribute
     */
    public void setDefaultChecked(boolean defaultChecked)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(DEFAULTCHECKED$2);
            if (target == null)
            {
                target = (org.apache.xmlbeans.SimpleValue)get_store().add_attribute_user(DEFAULTCHECKED$2);
            }
            target.setBooleanValue(defaultChecked);
        }
    }
    
    /**
     * Sets (as xml) the "defaultChecked" attribute
     */
    public void xsetDefaultChecked(org.apache.xmlbeans.XmlBoolean defaultChecked)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.XmlBoolean target = null;
            target = (org.apache.xmlbeans.XmlBoolean)get_store().find_attribute_user(DEFAULTCHECKED$2);
            if (target == null)
            {
                target = (org.apache.xmlbeans.XmlBoolean)get_store().add_attribute_user(DEFAULTCHECKED$2);
            }
            target.set(defaultChecked);
        }
    }
    
    /**
     * Unsets the "defaultChecked" attribute
     */
    public void unsetDefaultChecked()
    {
        synchronized (monitor())
        {
            check_orphaned();
            get_store().remove_attribute(DEFAULTCHECKED$2);
        }
    }
}
